﻿using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;

namespace TSVNAddin.SVN.Test
{
	[TestFixture]
	public class RepositoryPathBuilderFixture
	{
		[Test]
		public void BuildPath()
		{
			string filePath = @"c:\MyProject\trunk\File.txt";
			Uri repositoryUri = new Uri(@"http://server.com/svn/myproject/");
			Uri fileUri = new Uri(@"http://server.com/svn/myproject/trunk/file.txt");

			RepositoryPathBuilder builder = new RepositoryPathBuilder();
			string repositoryPath = builder.BuildPath(filePath, repositoryUri, fileUri);

			Assert.AreEqual(@"c:\myproject\", repositoryPath);
		}
	}
}
